package com.anyou.mall.pla.service.impl;

import java.util.List;
import com.anyou.common.utils.DateUtils;
import com.anyou.mall.pla.domain.PlaPartsBrand;
import com.anyou.mall.pla.mapper.PlaPartsBrandMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.anyou.mall.pla.mapper.PlaReportTypeMapper;
import com.anyou.mall.pla.domain.PlaReportType;
import com.anyou.mall.pla.service.IPlaReportTypeService;

/**
 * 举报类型Service业务层处理
 * 
 * @author ylj
 * @date 2022-03-18
 */
@Service
public class PlaReportTypeServiceImpl extends ServiceImpl<PlaReportTypeMapper, PlaReportType> implements IPlaReportTypeService
{
    @Autowired
    private PlaReportTypeMapper plaReportTypeMapper;

    /**
     * 查询举报类型
     * 
     * @param reportTypeId 举报类型主键
     * @return 举报类型
     */
    @Override
    public PlaReportType selectPlaReportTypeByReportTypeId(Long reportTypeId)
    {
        return plaReportTypeMapper.selectPlaReportTypeByReportTypeId(reportTypeId);
    }

    /**
     * 查询举报类型列表
     * 
     * @param plaReportType 举报类型
     * @return 举报类型
     */
    @Override
    public List<PlaReportType> selectPlaReportTypeList(PlaReportType plaReportType)
    {
        return plaReportTypeMapper.selectPlaReportTypeList(plaReportType);
    }

    /**
     * 新增举报类型
     * 
     * @param plaReportType 举报类型
     * @return 结果
     */
    @Override
    public int insertPlaReportType(PlaReportType plaReportType)
    {
        plaReportType.setCreateTime(DateUtils.getNowDate());
        return plaReportTypeMapper.insertPlaReportType(plaReportType);
    }

    /**
     * 修改举报类型
     * 
     * @param plaReportType 举报类型
     * @return 结果
     */
    @Override
    public int updatePlaReportType(PlaReportType plaReportType)
    {
        plaReportType.setUpdateTime(DateUtils.getNowDate());
        return plaReportTypeMapper.updatePlaReportType(plaReportType);
    }

    /**
     * 批量删除举报类型
     * 
     * @param reportTypeIds 需要删除的举报类型主键
     * @return 结果
     */
    @Override
    public int deletePlaReportTypeByReportTypeIds(Long[] reportTypeIds)
    {
        return plaReportTypeMapper.deletePlaReportTypeByReportTypeIds(reportTypeIds);
    }

    /**
     * 删除举报类型信息
     * 
     * @param reportTypeId 举报类型主键
     * @return 结果
     */
    @Override
    public int deletePlaReportTypeByReportTypeId(Long reportTypeId)
    {
        return plaReportTypeMapper.deletePlaReportTypeByReportTypeId(reportTypeId);
    }
}
